<template>
  <div>
    <div class="LibraryView">
      <div class="container">
        <div class="header">
          <div class="headbox">
            <div class="head">
              <div class="textbox">

                <a :class="{ bon: bbon == 0 }" @click="getlibrary(0)">借阅馆</a>


                <a :class="{ bon: bbon == 1 }" @click="getlibrary(1)">校友图书馆</a>

              </div>
              <router-link tag="div" to="FindView" class="bon">
                <a href=""><img src="../assets/img/sharegroup_icon_search.png" alt=""></a>
              </router-link>
            </div>
          </div>
        </div>

        <LendingLibrary v-if="bbon == 0" />
        <SchoolLibrary v-if="bbon == 1" />


      </div>
    </div>
    <br>
    <br>
    <br>



  </div>
</template>

<script>
import LendingLibrary from '../components/LendingLibrary.vue'
import SchoolLibrary from '../components/SchoolLibrary.vue'
export default {
  data() {
    return {
      bbon: 0
    }
  },
  components: {
    LendingLibrary,
    SchoolLibrary
  },
  methods: {
    getlibrary(i) {
      this.bbon = i
    }
  },
}
</script>

<style lang="scss" scoped>
@import '../assets/css/base.css';

.LibraryView {
  .container {
    .header {
      position: fixed;
      top: 0px;
      left: 0px;
      width: 100%;
      z-index: 100;
      background-color: #fff;

      .headbox {
        padding-top: 22px;
        padding-left: 12px;
        padding-right: 18px;

        .head {
          display: flex;
          justify-content: space-between;
          align-items: center;

          .textbox {
            display: flex;
            align-items: baseline;

            a {
              margin-right: 24px;
              font-size: 18px;
              color: #9ea9bc;
              padding-bottom: 6px;

            }

            .bon {
              font-size: 22px;
              color: black;
              border-bottom: 5px solid #f5c265;
            }
          }

          .bon {
            a {
              img {
                width: 22px;
                height: 22px;
              }
            }
          }
        }
      }
    }

    .foot-box {
      .footbox {
        display: flex;
        justify-content: space-around;
        align-items: center;
      }
    }

    .footbox {
      .footer {
        display: flex;
        flex-direction: column;

        .img {
          width: 25px;
          height: 25px;

          img {
            width: 100%;
            height: 100%;
          }
        }

        a {
          font-size: 12px;
          color: #8a929e;

          &.bon {
            color: #478d6b;
          }
        }

        &:nth-child(3) {
          .img {
            width: 55px;
            height: 55px;
          }
        }
      }
    }
  }

  /* .container .header .headbox .head .textbox div.txt{
    font-size: 20px;
    color: black;
    border-bottom: 5px solid;
} */
  .banner {
    padding: 12px;
    height: 150px;
    margin-top: 66px;

    img {
      width: 100%;
      height: 100%;
      border-radius: 6px;
    }
  }

  .zonebox {
    padding: 10px 16px;

    .textbox {
      display: flex;
      justify-content: space-between;
      align-items: center;

      p {
        color: #111e36;
        font-size: 20px;
      }

      .box {
        display: flex;

        a {
          font-size: 14px;
          color: #bec5d2;

          i {
            width: 20px;
            height: 20px;
            background: url(../assets/img/top_ic_help.png) center center no-repeat;
            background-size: 100%;
            display: inline-block;
          }
        }
      }
    }

    .navbook {
      margin-top: 22px;
      display: flex;
      justify-content: space-around;

      .itembox {
        display: flex;
        align-items: center;
        flex-direction: column;

        img {
          width: 30px;
          height: 30px;
        }

        a {
          font-size: 12px;
          padding-top: 6px;
          color: #788190;
        }
      }
    }
  }

  /* 热门借阅 */
  .bookbox {
    padding: 30px 12px;
    padding-bottom: 0px;

    .titlebox {
      display: flex;
      justify-content: space-between;
      align-items: baseline;

      p {
        font-size: 20px;
        color: #000;
        font-weight: bold;
      }

      .abox {
        display: flex;
        align-items: center;

        a {
          padding-right: 2px;
          font-size: 14px;
          color: #cdd2dc;

          i {
            width: 12px;
            height: 12px;
            background: url(../assets/img/icon_common_more.png) center center no-repeat;
            background-size: 100%;
            display: inline-block;
            margin-top: 4px;
          }
        }
      }
    }
  }

  .newbook {
    padding: 0 18px;
    margin-top: 22px;

    .book-box {
      display: flex;
      justify-content: space-between;
    }

    .imgbox {
      height: 170px;
      width: 88px;

      .img {
        width: auto;
        height: 120px;
        padding-right: 4px;

        img {
          width: auto;
          height: 100%;
        }
      }

      span {
        padding-top: 4px;
        font-size: 13px;
      }
    }
  }

  /* 底部 */
  .foot-box {
    width: 100%;
    position: fixed;
    bottom: -3px;
    background-color: #fff;
    padding-top: 4px;
    padding-bottom: 7px;
    box-shadow: 0px 3px 1px 0px rgba(0, 0, 0, 0.21);
  }

}
</style>